import { Material } from "../material/index";
import { Editor } from "../editor/index";
import { Config } from "../config/index";
import "./index.css";
import { PageContext } from "../../store";
import { useState } from 'react';

export const Main = () => {
  const [list, setList] = useState([]);
  const [currentConfigId, setCurrentConfigId] = useState('');

  return (
    <div className="main-container">
      <PageContext.Provider value={{
        list,
        setList,
        currentConfigId,
        setCurrentConfigId
      }}>
        <Material />
        <Editor />
        <Config />
      </PageContext.Provider>
    </div>
  );
};
